R for Play: When Data Meets Creativity

Exploring how R can make everyday life more fun and personal

Talk for Manchester R User Group (RUG)

Njoki Njuki, Data Analyst, University of Oxford

2025-11-13

Why This Talk


  • We often think of R as something we use for work or research.
  • But what if R could also be fun, creative, and personal?
  • Today, I’ll share a few of my pet projects that made my everyday life more playful.

“Play is the highest form of research.” – Neville V. Scarfe

What ‘Play’ Means Here


  • “Play” = experimenting, trying things without deadlines.

  • Exploring what R can do outside of work or school.

  • Learning through curiosity and creativity.

Pet Project 1 – Tidytuesday Adventures

Aim: To improve my data visualisation skills and understand which plots fit the data.

  • I use #TidyTuesday to explore new datasets 📊

  • It’s a great way to practice data wrangling, visualisation, and storytelling.

What I Gained: Confidence in communicating insights visually, and new connections in the #TidyTuesday community.

Example Projects

💡 Inspiration from Nicola Rennie

Nicola Rennie has a really practical way of approaching personal and learning projects in R:

  • Keep a small list of packages you’d like to try out 💻
  • Keep another list of plots or visual styles you’d like to learn 🎨
  • Get inspiration from what others create, even if it’s not made in R!
    • The Datawrapper is a great source of ideas.
    • Visual Vocabulary - Designing with data: There are many ways to visualise data, this guide helps you choose a chart type based on the key relationships in your story, offering a starting point for creating clear and meaningful visuals.
  • When you find a new dataset, check if it connects to something on your list, that’s your next mini-project! 🚀

Pet Project 2 – Personal Menu Generator 🍜


Aim: To make decision-making around meals easier and fun while settling into a new city/culture.

  • When I moved to the UK, I built a script to help me choose what to eat during the departmental dinner.
  • It randomly picked meals from a list, saving time and making it fun!

What I Gained: Practical use of randomness and reproducibility in everyday life.

The description of the dataset of menu choices included:

starter: 1) Pumpkin veloute, quince. hazelnut oil; 2) Chicken liver parfait, apple, brioche; 3) Devon brown crab crumpet, piccalilli, pink grapefruit, mint

main dishes: 1) Roast turkey with all the trimmings; 2) Pollock, caulilower gratin, chicory, seaweed butter, Port, blackberry ; 3) Brased ox cheek, Boulongerer potato, carrot, bone marrow, red wine

dessert: 1) Chocolate Fondant, salted caramel ice cream, boozy cherry; 2) Vanilla creme brulee, quince; 3) Stickey pear cake, toffee

library(dplyr)
library(tibble)

# create a tibble with all the options
dinner_df <- tibble(starter = c(1, 2, 3),
                    main = c(2, 1, 3),
                    dessert = c(3, 2, 1))
set.seed(01) # to reproduce the same values for the sample
(my_dinner <- dinner_df %>% 
  dplyr::sample_n(1))
# A tibble: 1 × 3
  starter  main dessert
    <dbl> <dbl>   <dbl>
1       1     2       3

Pet Project 3 – Gift Selector 🎁

Aim: To build a small recommendation system for personal gifts, while learning how to add custom themes and fun fonts in Shiny apps.

What I Gained: A better grasp of Shiny themes and styling, plus a playful way to combine functionality with design and yes, a few great for my partner and I too!

Pet Project 4 – Designing Pride Flags with R 🌈

Aim: To express creativity and identity using R as a digital art tool.

  • Designed pride flags for my home using R and {ggplot2}.

  • Experimented with colours, proportions, and geometric shapes.

  • Learned how art and code can beautifully overlap.

What I Gained: I discovered that most of the ideas I imagine, R can actually create, which expanded my curiosity and confidence in exploring R programming. It also deepened my appreciation for how R blends data, design, and self-expression, and gave me a joyful way to decorate my home.

Designing Pride Flag GitHub Repo

Pet Project 5 – R on My Phone 📱

Aim: To make R accessible for on-the-go experiments.

  • Installed R on my phone via Ubuntu + Termux.

  • Handy for testing small code snippets anywhere!

  • Example use cases:

    • Quick data summaries
    • Random number generators
    • Running simple models while watching web lectures for my MSc

What I Gained: I learned how to install and run R on my phone, which means I can quickly test commands and ideas even without having R installed locally. It gave me a real sense of freedom, knowing I can explore and experiment anywhere, anytime.

Step-by-step: Run R inside Ubuntu + Termux

Do the steps below, having installed Termux from Google Play Store

  1. Update termux packages: pkg update && pkg upgrade -y

  2. Install the proot-distro tool: pkg install proot-distro -y

  3. Install an Ubuntu rootfs (download + expand): proot-distro install ubuntu

  4. List installed distros (optional check): proot-distro list

  5. Enter the Ubuntu environment: proot-distro login ubuntu. Your prompt changes from something like: u0_a123@localhost:~$ to root@localhost:~#

  6. Now you are “inside” Ubuntu: use apt to install things: apt update && apt upgrade -y

  7. Install R inside the Ubuntu container: apt install r-base -y

  8. Test if R is installed: R --version

  9. Start R: R

  10. Quit R: q()

References: Installing RStudio on Termux; Installing R on Android via Termux; Qn: Installing R on Android

NOTE: This was a trial and error basis. I hope it works for you! :)

For subsequent login:

  1. Enter the Ubuntu environment: proot-distro login ubuntu

  2. Start R

Pet Project 6: Shiny App to Explore LGBTQ+ Movies in the UK 🎬🌈

Aim: To celebrate queer cinema and explore data storytelling through interactivity. This project was a collaboration with my rainbowR buddy Tami Martins, and together we experimented with adding features like a chatbot to share more information about each movie and used the {golem} package to better organise and structure our Shiny app.

  • Built a Shiny app that lets users explore data on LGBTQ+ movies shown in UK cinemas or available on streaming.
  • Users can filter by:
    • Year, genre, director, and representation type
    • IMDb rating or audience score

Visuals:

  • Interactive bar plots ({ggplotly} or {plotly})
  • Word clouds of film themes or directors
  • Data sourced from tidyrainbow within rainbowR community

What I Gained: I learned how to quickly integrate a chatbot into Shiny, gained some confidence using {golem} for scalable app design, and appreciated how collaboration can make creative coding even more fun and rewarding.

Curating and Sharing: My WeAreR-Ladies Week 💜

Aim: To engage with the global R community by curating the We Are R-Ladies account, sharing resources, ideas, and projects that encourage creativity and confidence in using R. I wanted to highlight how diverse the R world can be, and spark new connections through conversation.

  • I had the chance to curate WeAreRLadies, the rotating Bluesky account that features R users of minority genders from around the world.
  • To prepare, I built an R Markdown file full of ideas and topics I wanted to share.
  • Throughout the week I:
    • Explored new #TidyTuesday datasets 🎨
    • Shared interesting packages like {tidylog}, my wrangling co-pilot 🧭
    • Posted reflections on learning, creativity, and community
  • What I Gained: This experience reminded me that sharing what you learn is also a form of play; it keeps curiosity alive and builds genuine connections across the R world. I also gained new perspectives from others’ journeys, discovered inspiring projects, and felt more connected to the creative, supportive spirit of the R community.

Why Play Matters


  • Playful R projects helped me:

    • Learn new packages and tricks.

    • Stay motivated and curious.

    • See R as part of everyday life, not just work.

  • Fun projects build real skills.

What You Can Try Next


  • Join #TidyTuesday and pick a dataset that interests you.

  • Try making generative art with {ggplot2}.

  • Analyse your Spotify, Strava, or sleep data.

  • Build something personal such as a random quote generator or meal picker.

“If it brings you joy, it’s worth coding.”

Closing Thoughts

  • R is not just for work or studies; it’s for life, art, and play.
  • Debugging: where curiosity turns frustration into discovery. 🪲
  • Be curious. Experiment. Share.

Thank you!

Let’s connect:

📧 lucynjokinjuki@gmail.com

🐙 GitHub: Njoki Njuki

🦋 Bluesky: @njokinjuki.bsky.social